
<div class="layui-fluid">
  <div class="layui-row layui-col-space15">

    <div class="layui-col-md12">
      <div class="layui-card">
        <div class="layui-card-header">
          通知列表
          <a lay-href="/notify/list" class="layui-a-tips">更多消息
            <i class="layui-icon layui-icon-right LAY_icon"></i>  
          </a>
        </div>
        <div class="layui-card-body">

          <div class="layui-row layui-col-space30 LAY_notify_view" id="LAY-notify-view">

          </div>

          <script id="LAY-notify-tpl" type="text/html">
            {{#  d.list && layui.each(d.list, function(index, item){ }}
              <div class="layui-col-md6">
                <div class="layui-row">
                  <div class="layui-col-xs9 layui-col-sm9 layui-col-md9 LAY_notify_title" title="{{item.title}}"
                    lay-href="/notify/detail/id={{item.messageId}}">
                    {{#  if(item.isNew){ }}
                      <span class="layui-badge layui-bg-green LAY_badge">未读</span>
                    {{#  } else { }}
                      <span class="layui-badge-rim LAY_badge">已读</span>
                    {{#  } }}  
                    {{item.title}}
                  </div>
                  <div class="layui-col-xs3 layui-col-sm3 layui-col-md3 LAY_notify_date">
                    {{item.sentTime ? item.sentTime.split(' ')[0] : ''}}
                  </div>
                </div>
              </div>
            {{#  }); }}
            {{#  if(!d.list || (d.list && !d.list.length)){ }}
              <div class="LAY_empty">无数据</div>
            {{#  } }} 
          </script>
          
        </div>
      </div>
    </div>
    <div class="layui-col-md12">
      <div class="layui-card">
        <div class="layui-card-header">数据概览</div>
        <div class="layui-card-body">

          <div class="layui-row layui-col-space15">

            <div class="layui-col-md6 LAY_chart_sale">
              <div class="layui-row">
                <div class="layui-col-md12">
                  <div class="layui-carousel layadmin-carousel layadmin-dataview" data-anim="fade" lay-filter="LAY-sale-dataview">
                    <div carousel-item id="LAY-sale-dataview">
                      <div><i class="layui-icon layui-icon-loading1 layadmin-loading"></i></div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
  
            <div class="layui-col-md6 LAY_chart_number">
              <div class="layui-row">
                <div class="layui-col-md12">
                  <div class="layui-carousel layadmin-carousel layadmin-dataview" data-anim="fade" lay-filter="LAY-number-dataview">
                    <div carousel-item id="LAY-number-dataview">
                      <div><i class="layui-icon layui-icon-loading1 layadmin-loading"></i></div>
                    </div>
                  </div>
                </div>
              </div>
            </div>

            <div class="layui-col-md6 LAY_chart_channel">
              <div class="layui-row">
                <div class="layui-col-md12">
                  <div class="layui-carousel layadmin-carousel layadmin-dataview" data-anim="fade" lay-filter="LAY-channel-dataview">
                    <div carousel-item id="LAY-channel-dataview">
                      <div><i class="layui-icon layui-icon-loading1 layadmin-loading"></i></div>
                    </div>
                  </div>
                </div>
              </div>
            </div>

            <div class="layui-col-md6 LAY_chart_month">
              <div class="layui-row">
                <div class="layui-col-md12">
                  <div class="layui-carousel layadmin-carousel layadmin-dataview" data-anim="fade" lay-filter="LAY-month-dataview">
                    <div carousel-item id="LAY-month-dataview">
                      <div><i class="layui-icon layui-icon-loading1 layadmin-loading"></i></div>
                    </div>
                  </div>
                </div>
              </div>
            </div>

          </div>

        </div>
      </div>
    </div>
    
  </div>
</div>


<script>
//加载 controller 目录下的对应模块
/*

  小贴士：
    这里 console 模块对应 的 console.js 并不会重复加载，
    然而该页面的视图则是重新插入到容器，那如何保证能重新来控制视图？有两种方式：
      1): 借助 layui.factory 方法获取 console 模块的工厂（回调函数）给 layui.use
      2): 直接在 layui.use 方法的回调中书写业务代码，即:
          layui.use('console', function(){ 
            //同 console.js 中的 layui.define 回调中的代码 
          });
          
  这里我们采用的是方式1。其它很多视图中采用的其实都是方式2，因为更简单些，也减少了一个请求数。
  
*/
layui.use('console', layui.factory('console'));
</script>

